<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="Generator" content="JDoc®">
    <meta name="Author" content="JDoc-jxtpro">
    <meta name="Keywords" content="JDoc">
    <meta name="Description" content="JDoc">
    <title>JDoc</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>

<body>
    <div style="margin-left: 150px;">
       <form class="layui-form"  action="">
		  <div class="layui-form-item">
		    <label class="layui-form-label">接口地址</label>
		    <div class="layui-input-inline">
		      <input type="text" name="title" required  lay-verify="required" placeholder="请输入接口地址" autocomplete="off" class="layui-input">
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">接口描述</label>
		    <div class="layui-input-inline">
		      <input type="password" name="password" required lay-verify="required" placeholder="请输入接口描述" autocomplete="off" class="layui-input">
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">开关</label>
		    <div class="layui-input-block">
		      <input type="checkbox" name="switch" lay-skin="switch">
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <div class="layui-input-block">
		      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
		      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
		    </div>
		  </div>
		</form>
 
    </div>
    <script type="text/javascript" src="layui/layui.js"></script>
    <script type="text/javascript">
        /**
         * 对layui进行全局配置
         */
        layui.config({
            base: 'js/'
        });
        
        layui.use('form', function(){
	    var form = layui.form();
	  
	  	//监听提交
		  form.on('submit(formDemo)', function(data){
		    layer.msg(JSON.stringify(data.field));
		    return false;
		  });
		});
    </script>
</body>
</html>